Release 10.1A: OpenEdge Getting Started:
Application and Integration Services


The concept of separate sessions

An AppServer and its client applications run in separate sessions. Essentially, this means that they have no context in common. For Java, .NET, or Web service client applications that run in separately built and executed processes, this is clear. For 4GL client applications, it is not so obvious because, although both the 4GL client and the AppServer run in separate processes, they both run OpenEdge sessions in which some context is exchanged using a common Progress 4GL mechanism.

To reinforce the concept of separate sessions, it is helpful to imagine the existence of a processing boundary between the two sessions. Only remote procedure or user-defined function requests can break through this processing boundary. A 4GL client invokes these requests using the RUN statement, function invocation, and the CONNECT( ) and DISCONNECT( ) methods on a server object handle. For more information, see the information on programming Progress 4GL clients in OpenEdge Application Server: Developing AppServer Applications .

Figure 3–1 shows where a 4GL client application and its corresponding AppServer session maintain processing capabilities that are separate and distinct from each other.

Figure 3–1: Separate and distinct 4GL sessions

The term client session refers to all processing activities that occur within the context of the client application. Similarly, the term AppServer session refers to all processing activities that take place exclusively in the context of AppServer agents running on the AppServer.

Note: A given AppServer session exists in exactly one AppServer agent at any given moment. However, depending on the operating mode configured for an AppServer, the requests that a client application sends over a given connection can be processed in one or more AppServer agent sessions. For more information, see the information on understanding AppServer operating modes in OpenEdge Application Server: Developing AppServer Applications .

These two sessions maintain a clear separation of context: persistent procedures, transactions, database connections, AppServer connections, and database trigger events are separately scoped and operate only in the session in which they are invoked.

For example, even if a database is connected within an AppServer session, the client application must also connect to the database using a separate database connection if it wants direct access. For more information on managing database access in a distributed application environment, see OpenEdge Application Server: Developing AppServer Applications . However, for a WebClient™, the only way to access a database through the 4GL is through an AppServer session (see OpenEdge Deployment: WebClient Applications ).

For Java, .NET, and Web service clients, specially prepared methods perform the same function, as shown in Figure 3–2.

Figure 3–2: Separate and distinct application contexts

For more information, see OpenEdge Development: Open Client Introduction and Programming .


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095